home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 276-300 / 288 / scripit / qb < prev    next >
Text File  |  1995-03-14  |  2KB  |  50 lines

  1. ;; CLI Quarterback runner.
  2. ;;
  3. ;; Format:  scripit qb [source] [dest1] [dest2]
  4. ;;
  5. ;; e.g.     scripit qb dh2: df0: df1:
  6. ;;
  7. ;; Note:  all argument are optional except for the filename.
  8. ;;
  9. ;; A Scripit script by Khalid Aldoseri.
  10. ;; Needs Scripit version 1.20 or above.
  11.  
  12.  
  13. begin
  14. select wait 200 ABORT
  15.  
  16. if #argcount > 3                ;Did user supply more than 3 args?
  17. con echo "Too Many Args!"       ;Yes.  Complain,
  18. end                             ;and quit.
  19. endif
  20.  
  21. run "dr:Backup/Quarterback"     ;Run QuarterBack
  22.  
  23. $source = "DH0:"                ;default source device
  24. $dest1  = "DF0:"                ;default destination device # 1
  25. $dest2  = "DF1:"                ;default destination device # 2
  26.  
  27. if #argcount >= 1               ;Did user supply 1 or more args?
  28. $source = $arg[1]               ;yes, copy first arg into $source
  29. endif
  30.  
  31. if #argcount >= 2               ;Did user supply 2 or more args?
  32. $dest1  = $arg[2]               ;yes, copy second arg into $dest1
  33. endif
  34.  
  35. if #argcount == 3               ;Did user supply 3 args?
  36. $dest2  = $arg[3]               ;yes, copy third arg into $dest2
  37. endif
  38.  
  39. con text "Restoring FROM: " $source " TO: " $dest1 " + " $dest2 $lf
  40.  
  41. select window QuarterBack       ;wait until the QB window shows up
  42. wait
  43. gadget Restore                  ;click on Restore gadget
  44. wait
  45. gadget "" 0,1,0,0 $source       ;insert $source into gadget #1
  46. gadget "" 0,2,0,0 $dest1        ;insert $dest1  into gadget #2
  47. gadget "" 0,3,0,0 $dest2        ;insert $dest2  into gadget #3
  48. wait 10
  49. gadget proceed                  ;click on Proceed gadget
  50.